package com.hyy.demo.sample3;

import org.squirrelframework.foundation.fsm.UntypedAnonymousAction;
import org.squirrelframework.foundation.fsm.UntypedStateMachine;

/**
 * Created by hyygavin on 2017/12/11.
 */
public class EmotionAction extends UntypedAnonymousAction {
    final String name;

    EmotionAction(String name) {
        this.name = name;
    }

    public void execute(Object from, Object to, Object event, Object context, UntypedStateMachine stateMachine) {
        System.out.println(from);
        System.out.println(to);
        System.out.println(event);
        System.out.println(context);

        //TODO: 一系列的



        stateMachine.fire(name+",emotion");
    }

    public String name() {
        return name;
    }
}
